import axios from 'axios';


// axios.get('/GetApps')


// const path = 'http://192.168.3.106:88/PowerTool'
const path = '../';

export default {
    basePath: path,
    GetApps: () => {
        // return axios.get('/GetApps')
        return axios.get(path + '/GetApps.php')
    },
    AddVersion: (key, data) => {
        // return axios({
        //     method: 'post',
        //     url: '/AddVersion/' + key,
        //     data: data
        // })
        return axios({
            method: 'post',
            url: path + '/AddVersion.php?key=' + key,
            data: data
        })
    },
    GetApp: (key) => {
        // return axios.get('/GetApp/' + key)
        return axios.get(path + '/GetApp.php?key=' + key)
    },
    CreateApp: (item) => {
        // return axios({
        //     method: 'post',
        //     url: '/CreateApp',
        //     data: item
        // })
        return axios({
            method: 'post',
            url: path + '/CreateApp.php',
            data: item
        })
    },
}


